package threadDemo05;

public class TestDemo {
    public static void main(String[] args) {

        /**
         * setPriority(int newPriority)设置线程的优先级 max10 min1
         * final int getPriority()获得线程的优先级
         */
        //创建线程要执行的参数对象
        MyRunnable myRunnable=new MyRunnable();
        Thread thread1 =new Thread(myRunnable,"琪亚娜");
        Thread thread2 =new Thread(myRunnable,"德莉莎");

        thread1.setPriority(1);
        thread2.setPriority(10);

        thread1.start();
        thread2.start();

    }



}
